//
//  PKPayInstantBar.swift
//  Panku
//
//  Created by mac on 2017/5/28.
//  Copyright © 2017年 Monster. All rights reserved.
//

import UIKit

class PKPayInstantBar: PKBaseView {

    //MARK: - UI
    lazy var totalLabel = UILabel()
    lazy var amountLabel = UILabel()
    lazy var payNowButton = PKBaseButton.createButton()
    
    override func setupView() {
        self.addSubview(totalLabel)
        self.addSubview(amountLabel)
        self.addSubview(payNowButton)
        
        totalLabel.text = "合计:"
        totalLabel.textColor = UIColor(hexString: "343434")
        totalLabel.font = UIFont.PKFont(Size: 15)
        
        amountLabel.text = "￥597"
        amountLabel.textColor = UIColor(hexString: "262626")
        amountLabel.font = UIFont.PKFont(Size: 19)
        
        payNowButton.setImage(R.image.pay_now(), for: .normal)
        
        totalLabel.snp.makeConstraints { (make) in
            make.centerY.equalTo(self.snp.centerY)
            make.left.equalTo(self.snp.left).offset(12)
        }
        
        amountLabel.snp.makeConstraints { (make) in
            make.centerY.equalTo(self.snp.centerY)
            make.left.equalTo(totalLabel.snp.right).offset(20)
        }
        
        payNowButton.snp.makeConstraints { (make) in
            make.centerY.equalTo(self.snp.centerY)
            make.right.equalTo(self.snp.right).offset(12)
        }
    }

}
